package com.boot.config;

import com.mybatisflex.core.mybatis.FlexConfiguration;
import com.mybatisflex.spring.boot.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBatisFlexConfig {
    
    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return new ConfigurationCustomizer() {
            @Override
            public void customize(FlexConfiguration configuration) {
                // 配置MyBatis-Flex
                configuration.setCacheEnabled(false);
                configuration.setMapUnderscoreToCamelCase(true);
            }
        };
    }
}